Skip to content

Fix to properly skip all tornado server telemetry when URL excluded #3680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

devmonkey22
Copy link
Contributor

Description

Updated the tornado instrumentation to keep track of if the current handler is executing an excluded URL. If so, it skips tracking metrics both for request/responses.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added TestTornadoMetricsInstrumentation.test_exclude_lists test to verify metrics written don't include server metrics anymore when fetching an excluded URL.

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@devmonkey22 devmonkey22 requested a review from a team as a code owner August 5, 2025 21:45
@github-actions github-actions bot requested a review from shalevr August 5, 2025 21:45
@tammy-baylis-swi
Copy link
Contributor

Thanks for this one as well!

It looks like this PR includes the changes from #3679. Could we keep the changes separate?

@devmonkey22
Copy link
Contributor Author

Thanks for this one as well!

It looks like this PR includes the changes from #3679. Could we keep the changes separate?

@tammy-baylis-swi I need the code changes from #3679 in order to have a place to store the exclude_url flag in state (that's async-safe still). Is there a preferred way to include those changes? Or do you just want me to copy the code from init.py without the actual commits, then deal with the merge conflicts (if not auto-mergeable) later, depending on which PR merges first?

@tammy-baylis-swi
Copy link
Contributor

@tammy-baylis-swi I need the code changes from #3679 in order to have a place to store the exclude_url flag in state (that's async-safe still). Is there a preferred way to include those changes? Or do you just want me to copy the code from init.py without the actual commits, then deal with the merge conflicts (if not auto-mergeable) later, depending on which PR merges first?

Ah all right, and it is mentioned in the description.

There's no one preferred way. I'd suggest adjusting the description of #3679 to make it clear that it's introducing a new handler state object. Then maybe #3679 should be the one merged first, and this one after. I'll take a look at the other one for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tornado instrumentation collecting partial/incorrect telemetry when URL excluded
3 participants